import sys
import random
#
def appendZero(_int_ori,_int_length):
	_str_ori=str(_int_ori)
	_int_ori_length=len(_str_ori)
	if _int_ori_length>_int_length:
		return _str_ori[0:_int_length]
	else:
		for i in range(0,_int_length-len(_str_ori)):
			_str_ori+='0'
		return _str_ori	
#
def getPwdStr(int1,int2):
	return '98978799'+appendZero(int2,3)+appendZero(int1,5)+appendZero(random.random(0,sys.maxint),16)
#
def getRandonNumberAsPwd():
	randomNum=random.random(0,sys.maxint%32+1)
	if randomNum<10:
		rst='1'+str(randomNum)
	else:
		rst=str(randomNum)
	return rst
#
def int216bitString():
	for i in range(0,8)
		rst+=getRandonNumberAsPwd()
	return rst
#
def int28bitString(int1):
	return appendZero(int1,8)

#
def getRequestStr(a_api,a_pwditem)
	apiString=appendZero(a_api,8)
	pwditem=appendZero(a_pwditem,8)
	return apiString+pwditem+int216bitString
#
def getRequestStr(a_api,a_content_type,a_pwd_item,a_pwd_point):
	contentType=appendZero(a_content_type,3)
	apiStr=appendZero(a_api,5)
	pwdItem=appendZero(a_pwditem,5)
	return contentType+apiStr+random.random(100,199)+pwdItem+a_pwd_point

